/**************************提示：只允许修改开发区域，其他区域会被覆盖！********************************/
mod.definePage("extend/cp/bc/js/TravelAccountBill_SharingList001",function(waf){
    //@beginUseModule
    var bizCollBillBase = mod.useSync("cp/bc/js/bizCollBillBase");
    var bizCollBillSharingList = mod.useSync("cp/bc/js/bizCollBillSharingList");
    var TravelAccountBill_SharingList = mod.useSync("cp/bc/js/TravelAccountBill_SharingList");
    //@endUseModule
    var _public = {},_private = {},me=_self;
    //@beginPublic
    waf.extend(_public,{
        //控件事件描述:
        exportOnclick:function(undefined){
             return _private.exportOnclick(undefined);
        }
    });
    //@endPublic
    //@beginTemplateFunctions

    //@endTemplateFunctions

    /**************************开发区域开始**********************************************/
    //@beginPrivate
    waf.extend(_private,{
    	exportOnclick:function(undefined){
           var rows=waf("#queryGrid").wafGrid("getSelectedRows");
            if(rows.length==0){
              waf.msgBox.showWarning("请选择一行数据");
            }else{
              var ids={}; 
              for(var i=0;i<rows.length;i++){
                var id=waf("#queryGrid").wafGrid("getRowRealData",rows[i]).id;
                var number=waf("#queryGrid").wafGrid("getRowRealData",rows[i]).number;
                ids[id]=number;
              }
               var url = waf.getContextPath()+"/dynamicPage.do?method=doEvent&uipk=com.kingdee.eas.cp.bc.TravelAccountBill_SharingList001&action=excelExportAction"
              url = waf.appendConversationToURL(url);
              $('<form/>').appendTo('body').attr({'id':'exptoExcelform','method':'POST','action':url}) 
                                  .append($('<input/>').attr({'name':'type','value':"4",'type':'hidden'}))
                                  .append($('<input/>').attr({'name':'datas','value':waf.toJSONString(ids),'type':'hidden'}));
              $('#exptoExcelform').submit();
              $('#exptoExcelform').remove();
            }
        }
    });//@endPrivate
    /**************************开发区域结束**********************************************/
    return _public;
});
